<?php
class retrieve_contact extends retrieve_base{

	private $module_display_options 	= array();
	
	/**
	* function produces abstract structure of modules db structure
	*
    * used to generate the table structure required abstract function that passes an abstract
	* representation of the desired table structure to the proper database module which will
	* interpet the abstract and convert it into a valid SQL Create table structure.
	*
	* @return Array list of abstract table definitions for this module
	*/
	function create_table(){
	$tables = Array();
		/**
		* Table structure for table 'contact_data'
		*/
		$fields = array(
			array("contact_identifier"	,"unsigned integer"	,"NOT NULL"	,"auto_increment"),
			array("contact_client"		,"unsigned integer"	,"NOT NULL"	,"default '0'"),
			array("contact_user"		,"integer"			,"NOT NULL"	,"default '0'"),
			array("contact_first_name"	,"varchar(20)"		,"NULL"		,"default ''"),
			array("contact_last_name"	,"varchar(20)"		,"NULL"		,"default ''"),
			array("contact_initials"	,"varchar(3)"		,"NULL"		,"default ''"),
			array("contact_job_title"	,"varchar(40)"		,"NULL"		,"default ''"),
			array("contact_telephone"	,"varchar(20)"		,"NULL"		,"default ''"),
			array("contact_fax"			,"varchar(20)"		,"NULL"		,"default ''"),
			array("contact_profile"		,"text"				,"NULL"		,"default ''"),
			array("contact_date_created","datetime"			,"NULL"		,"default ''"),
			array("contact_address"		,"unsigned integer"	,"NOT NULL"	,"default '0'")
		);
		$primary="contact_identifier";
		$tables[count($tables)] = array("contact_data",$fields,$primary);

		$fields = array(
			array("company_identifier"	,"unsigned integer"	,"NOT NULL"	,"auto_increment"),
			array("company_name"		,"varchar(255)"		,"NULL"		,"default ''"),
			array("company_address"		,"unsigned integer"	,"NOT NULL"	,""),
			array("company_client"		,"unsigned integer"	,"NOT NULL"	,"default '0'"),
			array("company_web_site"	,"varchar(255)"		,"NULL"		,"default ''")
		);
		$primary="company_identifier";
		$tables[count($tables)] = array("contact_company",$fields,$primary);
		
		$fields = array(
			array("address_identifier"	,"unsigned integer"	,"NOT NULL"	,"auto_increment"),
			array("address_1"			,"varchar(255)"		,"NULL"		,"default ''"),
			array("address_2"			,"varchar(255)"		,"NULL"		,"default ''"),
			array("address_3"			,"varchar(255)"		,"NULL"		,"default ''"),
			array("address_city"		,"varchar(50)"		,"NULL"		,"default ''"),
			array("address_county"		,"varchar(50)"		,"NULL"		,"default ''"),
			array("address_country"		,"unsigned integer"	,"NULL"		,"default ''"),
			array("address_postcode"	,"varchar(10)"		,"NULL"		,"default ''"),
			array("address_created",	"datetime"			,"NULL"		,"default ''"),
			array("address_client"		,"unsigned integer"	,"NOT NULL"	,"default '0'")
		);
		$primary = "address_identifier";
		$tables[count($tables)] = array("contact_address",$fields,$primary);

		/**
		* Table structure for table 'domains'
		*/
		return $tables;
	}
		

}
?>